 /*****************************************************************************
 |					One Bad Apple?  Replication Dataset Study 2	  			  |
 |						Nathan T. Carrington and Colin French				  |
 *****************************************************************************/



***Replicate Figure 4 in manuscript 

mean sclegit if Treated==0
matrix results=r(table)
scalar m_ate=results[1,1]
 
 
reg sclegit i.Treated Female conservative pid age 
estimates store aveffects
quietly margins, at(Treated=(0 1))
#delimit ;
marginsplot,  
	title("Study 2: Treatment Effects on Supreme Court Diffuse Support", color(black) span)
	xtitle("Experimental Group")
	ytitle("Mean Diffuse Support")
	//note("Source: Lucid Study, April 29-May 7, 2019", span)
	//plotopts(connect(i))
	yline(`=scalar(m_ate)')	
	xlabel(
		0 "Control"
		1 "Treated"
		)
	scheme(plotplain)
	name(icc_manck_margins, replace)
	note("Source: MTurk Study 2. N=590.", size(tiny) span)
	;	

	
	 
***Replicate Figure 5 in manuscript 
 
 
reg sclegit Treated##republican
estimates store pideffects 

margins, at(Treated=(0 1) republican=(0 1))
#delimit ;
marginsplot,  
	title("Study 2: Heterogeneous Treatment Effects by Partisanship", color(black) span)
	xtitle("Experimental Group")
	ytitle("Predicted Institutional Support")
	note("Source: MTurk Study.", size(vsmall) span)
	//plotopts(connect(i))
	xlabel()
	scheme(plotplain)
	graphregion(margin(r=10))
	//noci
	name(ds_predicted, replace)
	;
